namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class UpdateGongZuoJiHua20190225 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.GongZuoJiHuaSons",
                c => new
                    {
                        gzjhsid = c.Int(nullable: false, identity: true),
                        gzjhssx = c.Int(nullable: false),
                        gzjhsnr = c.String(),
                        gzbz = c.String(),
                        gzjhsfz = c.Decimal(nullable: false, precision: 18, scale: 2),
                        gzjhshtml = c.String(),
                        GongZuoJiHuaNeiRong_nrid = c.Int(),
                    })
                .PrimaryKey(t => t.gzjhsid)
                .ForeignKey("dbo.GongZuoJiHuaNeiRongs", t => t.GongZuoJiHuaNeiRong_nrid)
                .Index(t => t.GongZuoJiHuaNeiRong_nrid);
            
            AddColumn("dbo.MyKaoHeBiao_two", "IsEdit", c => c.Boolean(nullable: false));
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.GongZuoJiHuaSons", "GongZuoJiHuaNeiRong_nrid", "dbo.GongZuoJiHuaNeiRongs");
            DropIndex("dbo.GongZuoJiHuaSons", new[] { "GongZuoJiHuaNeiRong_nrid" });
            DropColumn("dbo.MyKaoHeBiao_two", "IsEdit");
            DropTable("dbo.GongZuoJiHuaSons");
        }
    }
}
